home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16682 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: solon.com!not-for-mail
  2. From: kanze@gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.lang.c++
  4. Subject: Re: Is C/C++ convertor available ???
  5. Date: 11 Apr 1996 13:54:07 -0500
  6. Organization: GABI Software, Sarl.
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4kjkgf$bn2@solutions.solon.com>
  10. References: <4k5vt7$a3c@solutions.solon.com> <4kcmib$ova@solutions.solon.com>
  11.     <4kg88m$ig8@solutions.solon.com>
  12. NNTP-Posting-Host: solutions.solon.com
  13.  
  14. In article <4kg88m$ig8@solutions.solon.com> ohara@tiac.ent (William
  15. O'Hara) writes:
  16.  
  17. |> >You heard wrong. g++ is a C++ compiler, not a C++ to C 
  18. |> translator, and it has
  19. |> >no such option.
  20.  
  21. |>     I DO NOT use gcc.  Yet I wouldn't doubt that 
  22. |> there was a feature.. After all C++ is an extension to
  23. |> C which is theortically an extension to itself. :) 
  24. |> Classes and such all boil down to structures.. Don't
  25. |> ever get the idea that C++ is its own language. It goes
  26. |> through a tier of translation before compilation. 
  27.  
  28. This is complete bullshit.  C++ is a language derived from C, in a way
  29. vaguely resembling how French derived from Latin.  While it shares a
  30. certain number of constructs with C (enough so that a significant number
  31. of C programs are also legal C++), it is very definitly a distinct
  32. language.
  33.  
  34. And I'm curious as to what is meant by `going through a tier of
  35. translation'.  The preprocessor is common to both C and C++.
  36.  
  37. As for translating C++ to C...  Older Cfront compilers used C as an
  38. intermediate language (as do some implementations of Eiffel or Scheme).
  39. As far as I know, this is not the case of any currently available
  40. compiler.  Certainly neither Sun CC nor g++ have an option to generate
  41. C, nor have any intermediate step which uses C.  (I might add that one
  42. of the reasons why Novell stopped development on CFront is that there
  43. are certain C++ constructs, like exceptions, which simply cannot be
  44. efficiently modeled in C.)
  45. -- 
  46. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  47. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  48. Conseils en informatique industrielle --
  49.                             -- Beratung in industrieller Datenverarbeitung
  50.